function[ut_years] = fday2ut(fday)

dof0 = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334]';
[iy, im, id, ih, min, sec] = datevec(fday+730486); % t is MJD2000
ifleapyr = mod(iy, 4) == 0; % 1 if leap year, 0 otherwise
i2 = im > 2 & ifleapyr == 1;
ut_years = iy + (dof0(im) + id-1+i2 + (ih+min/60+sec/3600)/24)./(365+ifleapyr); % UT in yrs